home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / text / hyper / hsc.lha / hsc / starter-project / include / page.hsc next >
Text File  |  1998-09-06  |  1KB  |  39 lines

  1. <****** page ****************************************************************
  2. * NAME
  3. *   page -- Macro to insert the dull html stuff for a page.
  4. * SYNOPSIS
  5. *   <$macro page section:string heading:string/required>
  6. * FUNCTION
  7. *   This macro inserts the dull <head> and <body> stuff and computes a
  8. *   document title consisting of a optional section and a required heading.
  9. * INPUTS
  10. *   section - Optional name of the section of your site (e.g. "Support"),
  11. *       used in title but not in heading. If this is omitted, the title is
  12. *       equal to the heading.
  13. *   heading - Heading displayed at top of document; also used for title
  14. ****************************************************************************>
  15. <$macro page /close
  16.     section:string
  17.     heading:string/required
  18. >
  19. <* Figure out the title (usually displayed in the browser window title) *>
  20. <$define title:string="">
  21. <$if cond=(set section)>
  22.    <$let title=(section + " - ")>
  23. </$if>
  24. <$let title=(title + heading)>
  25.  
  26. <* Insert head *>
  27. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
  28. <html><head>
  29. <title><(title)></title>
  30. </head>
  31.  
  32. <* Insert body including macro contents *>
  33. <body>
  34. <h1><(heading)></h1>
  35. <$content>
  36. </body></html>
  37.  
  38. </$macro>
  39.